Performance comparison of structured H∞ based looptune and LQR for a 4-DOF robotic manipulator

We explore looptune, a MATLAB-based structured H∞ synthesis technique in the context of robotics. Position control of a 4 Degree of Freedom (DOF) serial robotic manipulator developed using Simulink is the problem under consideration. Three full state feedback control systems were developed, analyzed and compared for both steady-state and transient performance using the Linear Quadratic Regulator (LQR) and looptune. Initially, a single gain feedback controller was synthesized using LQR. This system was then modified by augmenting the state feedback controller with Proportional Integral (PI) and Integral regulators, thereby creating a second and third control system respectively. In both the second and third control systems, the LQR synthesized gain and additional gains were further tuned using looptune to achieve improvement in performance. The second and third systems were also compared in terms of tracking a time-dependent trajectory. Finally, the LQR and looptune synthesized controllers were tested for robustness by simultaneously increasing the mass of each manipulator link. In comparison to LQR, the second system consisting of Single Input Single Output (SISO) PI controllers and the state feedback matrix succeeded in meeting the control objectives in terms of performance, optimality, trajectory tracking, and robustness. The third system did not improve performance in contrast to LQR, but still showed robustness under mass variation. In conclusion, our results have shown looptune to have a comparatively better performance over LQR thereby highlighting its promising potential for future emerging control system applications.


Introduction
Current research in robotics is focused on devising novel solutions for a variety of control problems [1] such as executing motion in deformable and uneven spaces, gripping delicate and fragile objects, performing efficient supervisory control for swarm robots etc. These tasks become critically important in the context of human-robot interaction [2]. "Anthropocentric" or "human-friendly" intelligent robotic systems are gradually becoming ubiquitous. However, researchers are confronted by the highly nonlinear, random, and time-varying nature of the control problems [3,4]. As reported in several works [2,[5][6][7][8][9][10][11][12][13][14][15], adaptive, intelligent and robust control techniques are one of the many strategies having potential to overcome the abovementioned problems. Adaptive control algorithms incorporate parameter estimation in one form or the other [16] and is further classified into conventional and robust categories [17]. Although adaptive control demonstrably achieves continuous improvement in tracking error, assumptions on structure and uncertainty size are made in most of the methods. Also, several studies have proven "model-free" or no "prior assumptions on the plant" controllers to exhibit poor performance [18][19][20][21]. Intelligent control is the application of artificial or computer-aided intelligence techniques such as neural networks, evolutionary computation, fuzzy logic [22], machine or reinforcement learning to (usually) complex and non-trivial dynamical systems [23,24]. In [25], a full-state output-feedback adaptive fuzzy controller has been devised with with output constraint. Likewise, an adaptive impedance-based control strategy using neural networks was developed to tackle dynamical uncertainties dynamics for a trajectory tracking problem [26]. Although the future of intelligent control seems promising [27,28], the cost and failure rate associated with implementing such control schemes is higher in comparison to conventional schemes, especially for complex systems. Moreover, artificial neural networkbased control designs are mostly simulation-based with slight evidence of practical implementation [2].
In robust control, a pre-designed static or fixed structure controller compensates for bounded parametric uncertainties or disturbances and therefore does not require online tuning [29,30]. Thus, robust control offers better performance in terms of responsiveness [31] and practical realization [32] in comparison to adaptive control. An overview of robust control for robotic manipulators has been presented in [33][34][35]. H 1 control is a well-known robust control technique and has been applied extensively on a variety of rigid and flexible robotic models. Control design for a quadcopter has been developed by integrating nonlinear H 1 and Model Predictive Control [36] and in [37] by using integral sliding mode control. A robust regulator was designed for a 2 Degree Of Freedom (DOF) platform using mixed H 2 =H 1 synthesis and considering pole-placement constraints in a linear matrix inequality framework [38]. H 1 regulation using local gravitational force compensation for a 3-DOF robotic manipulator was designed in [39]. In [40], a finite-time globally stable H 1 controller was designed without solving for Hamilton-Jacobi equation or Algebraic Riccati equation by using the backstepping method. Luo et al. devised H 1 control for 2-Dimensional (2D) Takagi-Sugeno fuzzy systems characterized by time-delays and missing measurements within a second Fornasini-Machesini local state-space framework [41]. Similarly, a novel 2D sensor state estimator guaranteeing l 2 -l 1 disturbance attenuation and power bound constraints has been developed in [42]. In [43], a novel nonlinear H 1 controller has been designed for a multi-DOF robotic arm using the concept of min-max differential games. An adaptive fuzzy neural network controller based on impedance learning was implemented for a constrained 3-DOF robot in [44]. The idea of inverse optimal Proportional Integral Derivative (PID) control combined with Feed-Forward control in an H 1 framework has been considered in [45]. Finally, H 1 control has been designed for distributed/decentralized control using multiple industrial manipulators [46].
In all of the methods described above, a centralized and full-order controller is obtained without the possibility of enforcing structure. The controllers are synthesized by either Semi Definite Programming (SDP) [47], Algebraic Riccati Equations [48] or bounded real lemmas involving Lyapunov variables. Structural constraints cause Bilinear Matrix Inequalities (BMIs) to be introduced into such H 1 techniques and make them non-convex. Optimization programs of moderate size have been proven to experience numerical complications for such BMIs [49].
The development of novel nonsmooth optimization techniques has allowed for structured H 1 synthesis to be carried out under structural constraints [49,50]. These algorithms were finally incorporated in MATLAB [51][52][53] as hinfstruct and looptune commands in the Robust Control Toolbox. While hinfstruct has been successfully applied in several control studies [54][55][56][57][58][59][60][61][62][63], it requires the design requirements to be specified in terms of a wellposed H 1 optimization problem. However, strong scaling and tight coupling in multi-loop control systems may lead to ill-posing of the H 1 problem. Erroneous results may also arise due to cross-coupling between feedback loops when considering stability margins of each loop separately [64,65]. Finally, in the studies described above no comparison of hinfstruct with existing control techniques in literature or improvement thereof has been considered.
On the other hand, the looptune command allows the user to specify the H 1 problem in terms of generalized high-level requirements, which lead to satisfactory results despite the problems described above [51,53]. The looptune command has been used to tune a 2-DOF PID controller which is then augmented with a reset controller for a 4-DOF robotic arm [66]. In [67], adaptive control is augmented with a looptune/hinfstruct synthesized robust controller. Zhao et al. developed a multi-variable robust controller for an electrified turbocharger using looptune [68]. Finally, in [69] looptune has been used to develop an outer control loop for a flexible x-hale aircraft, in conjunction with Gain Scheduling [70].
This study has been specifically conducted to assess the advantage of the novel MATLAB command looptune. For this purpose, comparison with a well-known optimal control technique, namely the Linear Quadratic Regulator (LQR) is carried out. The control problem under consideration is position control of a 4-DOF robotic arm developed in SimMechanics/ Simulink. With LQR, only a single gain can be synthesized for state feedback control. Determination of the optimum solution to the Algebraic Riccati Equation in LQR is often a tedious and time-consuming process. Finally, LQR does not provide robustness against uncertainties or disturbances. On the other hand, looptune allows minimization of the H 1 norm by tuning gains, transfer functions, state space models etc. in the control loop. Therefore, state feedback control can be modified to achieve optimal and robust performance.
To determine whether this is indeed the case, we developed two novel state feedback controllers by supplementing the original state feedback gain with additional gains, thus forming two different versions of PI control. Owing to its simplicity and ease of implementation, PI/ PID control is the most widely used control algorithm [71]. For the first controller, Single Input Single Output (SISO) PI controllers were added. In the second controller, a Multi-Input Multi-Output (MIMO) gain and integrator was added to form a MIMO PI controller. The looptune synthesized controllers were then compared against each other and the LQR synthesized single gain controller. As of present, no research article has compared the performance of looptune to LQR or other control techniques, especially in the context of position control for a 4-DOF robotic manipulator. The main contributions of this paper can be summarized as follows: 1. Development of two novel state feedback controllers by modifying the original single gain state feedback controller.
2. Tuning the gains of the novel state feedback controllers to achieve the desired specification.
3. Comparison of LQR and looptune synthesized controllers in terms of transient and steady-state performance, and robustness to uncertainty.
4. Comparison of two looptune synthesized controllers for trajectory tracking.
5. Using the results of the comparison to justify superiority of looptune over LQR in terms of performance and robustness.
6. Demonstrating the looptune synthesized second control system consisting of Single Input Single Output (SISO) Proportional Integral (PI) controllers and state feedback matrix as the candidate controller on a comparative basis.
The remainder of this paper is structured as follows. Section 2 describes the mathematical model of the robotic arm, while details on the performance specification, controller design and trajectory tracking are presented in Section 3. Simulation results are analyzed and discussed in Section 4. In Section 5, each of the controllers is analyzed for robustness under uncertainty. Lastly, Section 6 describes the controller selection in terms of the best overall performance and concludes the entire paper.

Model description
The robotic arm used for this research is a modification of an 8-DOF arm developed using SimMechanics in MATLAB 2012a for demonstration purposes by MathWorks. It originally consisted of five links namely the base, upper arm, forearm, wrist and gripper assembly. The base and upper arm were linked together using a 3-DOF spherical joint, while the upper armforearm, forearm-wrist, and wrist-gripper assembly were all linked together by 1-DOF revolute joints. Finally, the gripper assembly was composed of two fingers each having 1-DOF.
For our research, the gripper assembly was removed and the spherical joint was replaced by 2-DOF universal joint. The rest of the manipulator structure was kept intact. This modification resulted in a 4-DOF robotic manipulator which is more or less similar to many commercially available robotic manipulators. Fig 1 shows a basic sketch of the manipulator outlining its overall structure, home configuration and initial conditions. The initial conditions of the manipulator are given as θ 1 = 0, θ 2 = 0, θ 3 = 0 and θ 4 = 0. Fig 2 shows the implementation of the robotic arm in SimMechanics, a multibody toolbox in Simulink/MATLAB used for simulation and modeling of mechanical and electromechanical systems. The "Body Block" represents an individual robotic arm link such as the base, forearm, upper arm, and wrist. The "Universal/Revolute Joint Block" and "Weld Joint Block" determine rotation and fixation between two robotic arm links respectively. Actuation of the joints is provided by the "Joint Actuator Block", while output from the joint is obtained using "Joint Sensor Block". The "Ground Block", is an immobile ground point relative to an absolute inertial reference frame. Finally, the "Environment Block" is used for configuration of the simulation. The simulations have been performed on an Intel Core i5-2450M CPU system with 8 GB RAM and 500 GB Hard Disk. Table 1 describes the physical parameters of the Sim-Mechanics model of the Manipulator.
As seen in Fig 1, each joint has been assigned a number along with its respective angle. Each joint axis orientation is given in the adjacent parenthesis. Using MATLAB's "Linear Analysis Toolbox", the robotic manipulator is linearized about the initial conditions given in  (1).
M(θ) is a positive definite inertia matrix, Vðy; _ yÞ is a vector representing centrifugal and Coriolis forces, G(θ) is a vector for denoting gravitational forces and is a vector representing actuator torques. Deriving the above equations manually using Euler-Lagrange or Euler-Newton methodology is a tedious and lengthy procedure. SimMechanics allows for simulation and linear analysis of the robot dynamics without the need to derive (1).
The system described above has 8 states, 4 inputs and 8 outputs. The joints have been indexed as i = 1, 2, 3, 4 according to the configuration shown in and τ i represent the angular position/displacement, angular velocity, angular acceleration and applied torque/actuation of the i th joint respectively.

Linear quadratic regulator
The control design strategy has been formulated with the performance specification outlined in Table 2. Since our focus is on position control only, a system with Type I steady-state error is proposed. For Type I systems, the steady-state error for a step input (position constant) is zero, finite for a ramp input (velocity constant) and infinite for a parabolic input (acceleration constant) [72]. The Q and R matrices are the state and control weighting matrices respectively and are shown below by (2) and (3) Eqs (2) and (3) are then used to solve the Algebraic Riccati Equation given as follows in (4): Where A represents the state matrix, B is the control input matrix, and X is a solution to the above equation. By substituting X into (5), the control law τ is obtained as under.
Here K LQR represents the gain calculated using the LQR algorithm, while x ¼ ½y 3 _ y 3 y 4 _ y 4 y 1 y 2 _ y 1 _ y 2 � T denotes the state vector of the system. Outputs from the sensor blocks are multiplexed into a single signal and then subtracted from the signal emanating from the reference "Constant Block". The difference or error signal is then fed to state feedback gain represented by the "Gain Block".
Next, a quantityx is defined in (6) to denote the error or deviation from the reference or desired signal r. Using (6), closed loop dynamical model of the system is represented in (7).

Control cases
Using the idea presented in [73], two cases of initial and final positions have been considered to check whether controller performance is adversely affected by change of initial or final conditions. The first case represents the home configuration of the robotic arm, therefore the initial conditions in this configuration are zero by default. In the second set, all initial conditions have been set to 35 degrees. The initial condition for the second set is the final position of the first set, while the final position for the second set is obtained by adding 35 degrees. The joints of many commercially available robotic manipulators are capable of executing such a motion [74][75][76]. As shown in the following sections, each of the controllers is insensitive to change in initial and final conditions.

Manual tuning
In this procedure, the weights or values of θ 1 , θ 2 , θ 3 and θ 4 inside the cost matrix Q are adjusted while keeping the values of _ y 1 , _ y 2 , _ y 3 and _ y 4 constant at 1, until the performance objectives specified in Table 2 have been achieved. Likewise, the values of τ 1 , τ 2 , τ 3 and τ 4 inside the matrix R are kept constant at 1. The final Q and R matrices obtained are shown respectively in (8) and (9).
Substituting (8) and (9) into (4), and then substituting the result into (5), gives the value of the state feedback gain shown by (10).  Table 1. However, all of the joint angles excluding θ 4 suffer from a slight steady-state error. Also, each of the actuator torque exceeds 100 Nm.    and peak absolute are concerned, varying by 3% at the most. The values of overshoot, undershoot and steady-state error, although different, are negligible in comparison to the 15% and 10% requirements on steady-state error and percentage overshoot/undershoot respectively. Therefore, Control Case I and Case II can be assumed to be similar. It is also clearly evident from Table 3 that a prompt response is generated at a considerable cost of control energy. Despite expending such a large amount of control energy, the presence of steady-state error has not been eliminated.
In Section 3.4, the state feedback matrix K will be augmented with 4 SISO PI controllers. The feedback gain and SISO PI controllers will be simultaneously tuned with looptune to remove the steady-state error and keep the actuator torques below 100 Nm.

Structured H 1 based looptune
The looptune command converts the user specified requirements of control bandwidth, rise time, settling time etc. into weighting functions. These functions are in turn translated into an H 1 optimization problem. Looptune then invokes systune to minimize the H 1 norm by tuning user specified parameters or objects in the control loop such as gains, transfer functions, state space models, etc.
To achieve the desired bandwidth, looptune tunes the parameters such that the openloop gain crosses 0 dB in the crossover frequency interval specified by the user. Similarly, the open-loop response is shaped to perform integral action at low frequencies. Finally, the highfrequency roll-off exceeding -20 dB/decade guarantees robustness.
After successive trial and error, the gain crossover band is selected at 0.1 � ω � 100000 rad/s. The control system response time and bandwidth are also determined in this particular region. Table 3, the feedback loop is modified to include scalar 1 × 1 PI regulators. As depicted in Fig 6, a set of 4 SISO PI regulators is used, whereby each regulator is placed in series with each of the 4 actuators. The looptune command is then applied to simultaneously find optimal values for the gains and K. Eqs (11) and (12) represent the control law and closed loop error dynamics for the second control system respectively. The gains k P and k I respectively denote the proportional and integral gains. The proportional and integral gains are enclosed in 4 × 4 matrices K P−SISO and K I−SISO , represented by (13) and (14) respectively.

State feedback gain augmented with SISO PI controllers (SFG-SISO PI). To improve the transient and steady-state performance observed in
Since looptune requires an initial value for all of the tunable parameters present in the control loop, K LQR in (10) will be used to initialize looptune for tuning K. The initial values for the proportional and integral gains are given by (15) and (16).  such as rise time and settling appears to be negligible for angles, θ 2 and θ 3 while there is considerable improvement in the response of θ 4 . Table 4 summarizes the results for SFG-SISO PI. Similar to Table 3, the values of Case I and Case II in Table 4 are similar in terms of settling time, rise time, peak absolute torque, and steady-state error, with a maximum variation of 7% in peak absolute torque for joint angle θ 2 . Again, the difference in values of overshoot and undershoot are insignificant when compared with the requirement of 15%.

State feedback gain augmented with MIMO integral gain (SFG-MIMO PI).
For the third control system, a single 4 × 8 matrix K I is added in the feedback loop and cascaded with an integrator. The output from the integrator block is summed with the output from the state feedback matrix K P .
The main difference from the second control system lies in the fact that both K I and K P are 4 × 8 matrix gains as opposed to 1 × 1 scalar k P and k I gains. The gain K P is simultaneously acting as a state feedback gain as well as proportional gain in the third control system. On the other hand, the state feedback gain K in SFG-SISO PI is separate from the proportional gain k P . The implementation of this scheme is shown in Fig 9. Here K P is obtained by tuning K LQR computed in (10). This results in a MIMO PI controller. Eqs (20) and (21) describe the dynamics of this controller.
The integral gain K I will be initialized by the value given in (22). The final tuned values of K P and K I are shown in (23) and (24) It is evident from Figs 10 and 11 that in comparison to both LQR and SFG-SISO PI, the SFG-MIMO PI controller is slow. Except for angle θ 1 , actuator effort for SFG-MIMO PI is

PLOS ONE
greater than SFG-SISO PI. However, actuator effort for SFG-MIMO PI is still less than LQR for all joint angles. Numerical results for SFG-MIMO PI are presented in Table 5.
As discussed previously, the values of Case I and Case II are similar in terms of settling time, rise time and peak absolute torque, with maximum variation being 2%. When considering the requirement of Table 2, the differences in overshoot and undershoot are negligible for all the joint angles except for θ 4 . The values of overshoot observed for joint angle θ 4 , although different is nonetheless comparable.

Trajectory tracking control
Robotic manipulators perform pick and place tasks as one of their primary functions. In such cases, the manipulator has to follow a predefined time dependent trajectory as shown in Fig  12. Figs 13 and 14 show the trajectory tracking error for SFG-SISO PI and SFG-MIMO PI schemes respectively. The tracking error shown is the numerical difference between the input reference and the actual output response.
For both controllers, a finite steady-state error is observed during the rise and fall parts of the trajectory, which is within the ±10% limit given in Table 2. The steady-state error converges to zero as soon as the trajectory attains a constant value. This result is consistent with the expected behavior of a Type I control system. It is evident from both Figs 13 and 14 that SFG-SISO PI control has a comparatively smaller tracking error for all of the joint angles. In both cases, however, tracking error is the largest for the angle θ 1 , followed jointly by the angles θ 2 and θ 3 . Remarkably, θ 4 shows minimum tracking error.

Analysis of results
The results for the three control schemes are now compared in Table 6. The results are compared in terms of percentage reduction achieved with respect to the performance benchmarks specified in Table 2. Only the results for Case I are discussed since the results of Case II are more or less similar in terms of settling time, rise time and peak absolute torque for all three of the controllers as discussed above. It is apparent from Table 6 that there is a certain tradeoff involved between improvement in performance and controller effort. For example, the peak torque reduction for joint angle θ 1 in SFG-SISO PI control is only 9% more than the peak torque reduction for LQR. Correspondingly, the reduction in the rise time and settling times is 15% and 13% lower in SFG-SISO PI as compared to LQR control. Remarkably, the reduction in peak actuator torque of by 44% and 47% in SFG-SISO PI for joint angles θ 2 and θ 3 , gives nearly the same reduction in settling time and rise time as LQR control. For angle θ 4 however, an 80% reduction in peak absolute torque brings about 99% reduction in rise time and settling time, which is truly remarkable.
For SFG-MIMO PI control, the peak torque reduction θ 1 is 21% greater when compared to LQR. However, the reduction in rise and settling times is 70% and 62% less respectively. Similarly, for joint angle θ 2 a reduction of 16% and 24% is respectively observed in rise time and settling time for a 25% decrease in actuator torque. Results of the joint angle θ 3 are more or less similar to the angle θ 2 . In θ 4 , the rise time reduction is 4% greater than the corresponding  value in LQR control but the settling time reduction is 39% less for a 21% reduction in actuator torque. In light of the above results, the SFG-SISO PI control is a better option compared to both LQR and SFG-MIMO PI in terms of tradeoff or balance between controller effort and performance.

Uncertainty analysis
Since no mathematical model of any physical system can be fully accurate, there will always be an element of uncertainty in any control system design. One of the ways in which the effect of uncertainty in robotic manipulators can be observed is to affect parametric changes in the manipulator system. This is done by increasing the mass of all individual links simultaneously by 3, 5, 7 and 9 times and observing the transient and steady-state performance.
Only the results of the joint angle θ 1 (Case I) have been shown since the plots of other joint angles are more or less the same.

PLOS ONE
deviation from the results presented earlier in Section 3.4. Therefore, both SFG-SISO PI and SFG-MIMO PI controllers show robustness to uncertainty. The only difference discernable is that the actuator torque takes a longer time to converge as the mass of each link increases. Nevertheless, there is little or no difference in peak actuator torque.

Conclusion
LQR and looptune were compared in terms of transient and steady-state performance, and robustness to uncertainty using a 4-DOF robotic arm. For this purpose, three different full state feedback control architectures were developed. The feedback gain for the first control system was computed using LQR. In comparison, SFG-SISO PI and SFG-MIMO PI controllers were synthesized by looptune. The SFG-SISO PI and SFG-MIMO PI controllers were also compared in terms of trajectory tracking. The value of the state feedback gain calculated using LQR was used as an initial value by looptune. Despite expending a large amount of control effort, the LQR was unable to eliminate steady-state error. Moreover, it was found to lack robustness against increasing mass variation. The SFG-SISO PI controller delivered a slightly slow response by considerably reducing its control effort. It also eliminated the steady-state error while showing robustness to uncertainty. For a slight decrease in control effort, the response of SFG-MIMO PI controller was slowest. However, it still showed robustness to uncertainty. Therefore, from an overall perspective, the SFG-SISO PI controller fares as the best controller, validates the superiority of looptune over LQR and affirms the potential of looptune for future control system applications.
In this research, we have proposed a Type-I (position control) system for a rigid robotic arm. The proposed methodology may be extended to include velocity or acceleration control. This can prove highly useful in the context of robotic automation processes such as welding, painting, packaging, pick and drop etc. In addition, it has been assumed that all of the states are measurable. Practically, one or more of the states may not be measurable, necessitating the requirement of an observer. Consequently, the performance of a Linear Quadratic Gaussian (LQG) (or other observer based controllers) may be compared against looptune synthesized observer based controllers. Likewise, looptune synthesized controllers can also be compared against adaptive or intelligent controllers discussed in Section 1. The performance or robustness of looptune can also be compared against manually tuned H 2 and H 1 controllers. Finally, the performance of looptune can be evaluated for flexible robotic manipulator models. In summary, there are multiple directions in which the methodology applied in this paper can be explored or further improved.